﻿@model IQueryable<MIMSDomain.Entities.Patient>

@{
    ViewBag.Title = "Search";
}

<h2>Search Results</h2>

     @(Html.Telerik().Grid(Model)
     .DataKeys(keys => keys.Add(p => p.Id))
     .Name("Patients")
     .Columns(columns =>
         {
             columns.Command(command =>
                 {
                     command.Custom("Add").Text("Add").ButtonType(GridButtonType.ImageAndText)
                         .Action("Add", "MedicalHistory");
                     command.Custom("View").Text("View Medical History")
                         .Action("View", "MedicalHistory");
                 });
             columns.Bound(m => m.Code);
             columns.Bound(m => m.FirstName);
             columns.Bound(m => m.MiddleName);
             columns.Bound(m => m.LastName);
             columns.Bound(m => m.PatientType);
         })
     .Pageable(pageable => pageable.Enabled(true))
     .Editable(editing => editing.Enabled(false))
     .Filterable(filterable => filterable.Enabled(true))
     .Groupable(groupable => groupable.Enabled(true))
     .Footer(true))